﻿namespace T4UtilityBelt.DataDesigns.SharePoint
{
    public class UserInformationListProperty : ParentOne
    {
        public const string DefaultToName = "UserInformationList";

        public UserInformationListProperty()
            : this(null)
        {
            ShouldSerialize = false;
        }

        public UserInformationListProperty(string name)
            : base(name, DefaultToName)
        {
            StandardConstructor();
        }

        public UserInformationListProperty(string name, bool required)
            : base(name, DefaultToName, required)
        {
            StandardConstructor();
        }


        private void StandardConstructor()
        {
            ReadOnly = true;
        }

        public override bool IsToNameSpecified
        {
            get
            {
                return ToName != DefaultToName;
            }
        }

        public override bool IsPropertyTypeSpecified
        {
            get
            {
                return EntityModel.OptionalKeyType != PropertyType;
            }
        }

        public override bool IsReadOnlySpecified
        {
            get { return false; }
        }
    }

}